<template>
	<view style="width: 100vw; height: 100vh; background-color: #8CF6AB;">
		<view
			style="position: fixed; left: -375rpx; top: 250rpx; width: 1500rpx; height: 1500rpx; border-radius: 50%; background-color: #FFFFFF;">
			<!-- <view  style="font-size: 60rpx; color: #60CB64; font-weight: 800; text-align: center; line-height: 180rpx; position: absolute; left: 50%; border-radius: 50%; transform: translate(-50%,-50%); width: 180rpx; height: 180rpx; background-color: #FFFFFF; box-shadow: 1px 1px 10px #BBBBBB;">
				{{user.nickName.substr(-2,2)}}
			</view> -->
			<image
				style="display: block; font-size: 60rpx; color: #60CB64; font-weight: 800; text-align: center; line-height: 180rpx; position: absolute; left: 50%; border-radius: 50%; transform: translate(-50%,-50%); width: 180rpx; height: 180rpx; background-color: #FFFFFF; box-shadow: 1px 1px 10px #BBBBBB;"
				src="../../static/test/testFace.jpg"></image>
		</view>
		<view style="width: 750rpx;background-color: #FFFFFF;height: 2000rpx;position: fixed;top: 350rpx;">

			<view style="height: 100rpx; width: 100%; text-align: center;">

				<text style="font-size: 45rpx; font-weight: 1000;">管理员</text>

			</view>

			<view class="line_module" style="">
				<view @tap="openAboutUs" style="  border-right: 1px solid #BBBBBB; border-bottom: 1px solid #BBBBBB;"
					class="module">
					<icon class="icon-my icon-ziyuan162 iconfont"></icon>
					<text class="icon-title">关于我们</text>
				</view>
				<view @tap="openFeedback" style="border-bottom: 1px solid #BBBBBB;" class="module">
					<icon class="icon-my icon-yijianfankui iconfont"></icon>
					<text class="icon-title">意见反馈</text>
				</view>
				<view style="border-left: 1px solid #BBBBBB; border-bottom: 1px solid #BBBBBB;" class="module">

				</view>
			</view>
			<view class="line_module">
				<view style="border-right: 1px solid #BBBBBB; " class="module">

				</view>
				<view class="module">

				</view>
				<view style="border-left: 1px solid #BBBBBB; " class="module">

				</view>
			</view>
			<view class="line_module">
				<view style="border-right: 1px solid #BBBBBB; border-top: 1px solid #BBBBBB; " class="module">

				</view>
				<view style="border-top: 1px solid #BBBBBB;" class="module"></view>
				<view style="border-left: 1px solid #BBBBBB; border-top: 1px solid #BBBBBB;" class="module"></view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniNavBar from '@/components/uni/uni-nav-bar/uni-nav-bar.vue';
	import divider from '@/components/common/divider.vue';

	export default {
		components: {
			uniNavBar,
			divider
		},
		data() {
			return {
				isadmin: false,
				user: {
					nickName: '请先登录',
					phone: '',
					isLogin: false
				}
			}
		},
		onShow() {
			try {
				this.user.nickName = uni.getStorageSync('nickName') || '请先登录';
				this.user.phone = uni.getStorageSync('phone');
				if (this.user.nickName != '请先登录') {
					this.user.isLogin = true
				} else {
					this.user.isLogin = false
				}
			} catch (e) {}
<<<<<<< HEAD

			//修改未读消息数
			await this.$store.dispatch('rushNoRead');
=======
>>>>>>> parent of 9c00801 (2.0 老人，管理员，新的ui)
		},
		methods: {
			openLogin() {
				if (!this.user.isLogin) {
					uni.navigateTo({
						url: '../login/login'
					});
				} else {
					uni.navigateTo({
						url: './set/set'
					});
				}
			},
			openTask(e) {

				if (!this.user.isLogin) {
					uni.showToast({
						title: '请先登录',
						icon: 'none'
					})
				} else {
					uni.navigateTo({
						url: `./admin/task?id=${e}`
					})
				}

			},
			openProcess() {

				if (!this.user.isLogin) {
					uni.showToast({
						title: '请先登录',
						icon: 'none'
					})
				} else {
					uni.navigateTo({
						url: './user/application-progress-detail'
					});
				}

			},
			openApplicationRecord() {

				if (!this.user.isLogin) {
					uni.showToast({
						title: '请先登录',
						icon: 'none'
					})
				} else {
					uni.navigateTo({
						url: './user/application-record'
					});
				}

			},
			openAboutUs() {
				uni.navigateTo({
					url: './about-us'
				});
			},
			openFeedback() {
				uni.navigateTo({
					url: './feedback'
				});



			},
			handleMove() {

				if (!this.user.isLogin) {
					uni.showToast({
						title: '请先登录',
						icon: 'none'
					})
				} else {
					uni.showModal({
						title: '您确定要迁出',
						success: function(res) {
							if (res.confirm) {
								// 发出请求处理迁出生请
								uni.showToast({
									title: '迁出申请已发起,请等待管理员审核',
									icon: "none"
								});
							}
						}
					});
				}

			}
		}
	}
</script>

<style>
	.icon-title {
		font-size: 25rpx;
		color: #404040;
	}

	.icon-my {
		color: #60CB64;
		font-size: 100rpx !important;
		display: block;
		margin-bottom: 15rpx;
		margin-top: 15rpx;
	}

	.line_module {
		width: 602rpx;
		margin: 0 auto;
		display: flex;
	}

	.module {
		width: 200rpx;
		height: 200rpx;
		text-align: center;
	}
</style>
